<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
Sets (Guava: Google Core Libraries for Java - r08)
</TITLE>


<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="Sets (Guava: Google Core Libraries for Java - r08)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="interface in com.google.common.collect"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../com/google/common/collect/Sets.SetView.html" title="class in com.google.common.collect"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?com/google/common/collect/Sets.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Sets.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.google.common.collect</FONT>
<BR>
Class Sets</H2>
<PRE>
<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.google.common.collect.Sets</B>
</PRE>
<HR>
<DL>
<DT><PRE><FONT SIZE="-1"><A HREF="../../../../com/google/common/annotations/GwtCompatible.html" title="annotation in com.google.common.annotations">@GwtCompatible</A>(<A HREF="../../../../com/google/common/annotations/GwtCompatible.html#emulated()">emulated</A>=true)
</FONT>public final class <B>Sets</B><DT>extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
</PRE>

<P>
Static utility methods pertaining to <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util"><CODE>Set</CODE></A> instances. Also see this
 class's counterparts <A HREF="../../../../com/google/common/collect/Lists.html" title="class in com.google.common.collect"><CODE>Lists</CODE></A> and <A HREF="../../../../com/google/common/collect/Maps.html" title="class in com.google.common.collect"><CODE>Maps</CODE></A>.
<P>

<P>
<DL>
<DT><B>Since:</B></DT>
  <DD>2 (imported from Google Collections Library)</DD>
<DT><B>Author:</B></DT>
  <DD>Kevin Bourrillion, Jared Levy, Chris Povirk</DD>
</DL>
<HR>

<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->

<A NAME="nested_class_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Nested Class Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.SetView.html" title="class in com.google.common.collect">Sets.SetView</A>&lt;<A HREF="../../../../com/google/common/collect/Sets.SetView.html" title="type parameter in Sets.SetView">E</A>&gt;</B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;An unmodifiable view of a set which may be backed by other sets; this view
 will change as the backing sets do.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;B&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;B&gt;&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#cartesianProduct(java.util.List)">cartesianProduct</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;? extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;? extends B&gt;&gt;&nbsp;sets)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns every possible list that can be formed by choosing one element
 from each of the given sets in order; the "n-ary
 <a href="http://en.wikipedia.org/wiki/Cartesian_product">Cartesian
 product</a>" of the sets.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;B&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;B&gt;&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#cartesianProduct(java.util.Set...)">cartesianProduct</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;? extends B&gt;...&nbsp;sets)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns every possible list that can be formed by choosing one element
 from each of the given sets in order; the "n-ary
 <a href="http://en.wikipedia.org/wiki/Cartesian_product">Cartesian
 product</a>" of the sets.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;E extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</A>&lt;E&gt;&gt; 
<BR>
<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/EnumSet.html?is-external=true" title="class or interface in java.util">EnumSet</A>&lt;E&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#complementOf(java.util.Collection)">complementOf</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;E&gt;&nbsp;collection)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an <code>EnumSet</code> consisting of all enum values that are not in
 the specified collection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;E extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</A>&lt;E&gt;&gt; 
<BR>
<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/EnumSet.html?is-external=true" title="class or interface in java.util">EnumSet</A>&lt;E&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#complementOf(java.util.Collection, java.lang.Class)">complementOf</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;E&gt;&nbsp;collection,
             <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;E&gt;&nbsp;type)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an <code>EnumSet</code> consisting of all enum values that are not in
 the specified collection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;E&gt; <A HREF="../../../../com/google/common/collect/Sets.SetView.html" title="class in com.google.common.collect">Sets.SetView</A>&lt;E&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#difference(java.util.Set, java.util.Set)">difference</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;E&gt;&nbsp;set1,
           <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;?&gt;&nbsp;set2)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an unmodifiable <b>view</b> of the difference of two sets.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;E&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;E&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#filter(java.util.Set, com.google.common.base.Predicate)">filter</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;E&gt;&nbsp;unfiltered,
       <A HREF="../../../../com/google/common/base/Predicate.html" title="interface in com.google.common.base">Predicate</A>&lt;? super E&gt;&nbsp;predicate)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the elements of <code>unfiltered</code> that satisfy a predicate.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;E extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</A>&lt;E&gt;&gt; 
<BR>
<A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A>&lt;E&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#immutableEnumSet(E, E...)">immutableEnumSet</A></B>(E&nbsp;anElement,
                 E...&nbsp;otherElements)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an immutable set instance containing the given enum elements.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;E extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</A>&lt;E&gt;&gt; 
<BR>
<A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A>&lt;E&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#immutableEnumSet(java.lang.Iterable)">immutableEnumSet</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A>&lt;E&gt;&nbsp;elements)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an immutable set instance containing the given enum elements.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;E&gt; <A HREF="../../../../com/google/common/collect/Sets.SetView.html" title="class in com.google.common.collect">Sets.SetView</A>&lt;E&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#intersection(java.util.Set, java.util.Set)">intersection</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;E&gt;&nbsp;set1,
             <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;?&gt;&nbsp;set2)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an unmodifiable <b>view</b> of the intersection of two sets.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;E extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</A>&lt;E&gt;&gt; 
<BR>
<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/EnumSet.html?is-external=true" title="class or interface in java.util">EnumSet</A>&lt;E&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#newEnumSet(java.lang.Iterable, java.lang.Class)">newEnumSet</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A>&lt;E&gt;&nbsp;iterable,
           <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;E&gt;&nbsp;elementType)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a new <code>EnumSet</code> instance containing the given elements.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;E&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/HashSet.html?is-external=true" title="class or interface in java.util">HashSet</A>&lt;E&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#newHashSet()">newHashSet</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a <i>mutable</i>, empty <code>HashSet</code> instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;E&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/HashSet.html?is-external=true" title="class or interface in java.util">HashSet</A>&lt;E&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#newHashSet(E...)">newHashSet</A></B>(E...&nbsp;elements)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a <i>mutable</i> <code>HashSet</code> instance containing the given
 elements in unspecified order.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;E&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/HashSet.html?is-external=true" title="class or interface in java.util">HashSet</A>&lt;E&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#newHashSet(java.lang.Iterable)">newHashSet</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A>&lt;? extends E&gt;&nbsp;elements)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a <i>mutable</i> <code>HashSet</code> instance containing the given
 elements in unspecified order.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;E&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/HashSet.html?is-external=true" title="class or interface in java.util">HashSet</A>&lt;E&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#newHashSet(java.util.Iterator)">newHashSet</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A>&lt;? extends E&gt;&nbsp;elements)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a <i>mutable</i> <code>HashSet</code> instance containing the given
 elements in unspecified order.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;E&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/HashSet.html?is-external=true" title="class or interface in java.util">HashSet</A>&lt;E&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#newHashSetWithExpectedSize(int)">newHashSetWithExpectedSize</A></B>(int&nbsp;expectedSize)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an empty <code>HashSet</code> instance with enough capacity to hold the
 specified number of elements without rehashing.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;E&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;E&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#newIdentityHashSet()">newIdentityHashSet</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an empty <code>Set</code> that uses identity to determine equality.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;E&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/LinkedHashSet.html?is-external=true" title="class or interface in java.util">LinkedHashSet</A>&lt;E&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#newLinkedHashSet()">newLinkedHashSet</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a <i>mutable</i>, empty <code>LinkedHashSet</code> instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;E&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/LinkedHashSet.html?is-external=true" title="class or interface in java.util">LinkedHashSet</A>&lt;E&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#newLinkedHashSet(java.lang.Iterable)">newLinkedHashSet</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A>&lt;? extends E&gt;&nbsp;elements)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a <i>mutable</i> <code>LinkedHashSet</code> instance containing the
 given elements in order.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;E&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;E&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#newSetFromMap(java.util.Map)">newSetFromMap</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;E,<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</A>&gt;&nbsp;map)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set backed by the specified map.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;E extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</A>&gt; 
<BR>
<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/TreeSet.html?is-external=true" title="class or interface in java.util">TreeSet</A>&lt;E&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#newTreeSet()">newTreeSet</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a <i>mutable</i>, empty <code>TreeSet</code> instance sorted by the
 natural sort ordering of its elements.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;E&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/TreeSet.html?is-external=true" title="class or interface in java.util">TreeSet</A>&lt;E&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#newTreeSet(java.util.Comparator)">newTreeSet</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A>&lt;? super E&gt;&nbsp;comparator)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a <i>mutable</i>, empty <code>TreeSet</code> instance with the given
 comparator.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;E extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</A>&gt; 
<BR>
<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/TreeSet.html?is-external=true" title="class or interface in java.util">TreeSet</A>&lt;E&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#newTreeSet(java.lang.Iterable)">newTreeSet</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A>&lt;? extends E&gt;&nbsp;elements)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a <i>mutable</i> <code>TreeSet</code> instance containing the given
 elements sorted by their natural ordering.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;E&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;E&gt;&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#powerSet(java.util.Set)">powerSet</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;E&gt;&nbsp;set)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the set of all possible subsets of <code>set</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;E&gt; <A HREF="../../../../com/google/common/collect/Sets.SetView.html" title="class in com.google.common.collect">Sets.SetView</A>&lt;E&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#symmetricDifference(java.util.Set, java.util.Set)">symmetricDifference</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;? extends E&gt;&nbsp;set1,
                    <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;? extends E&gt;&nbsp;set2)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an unmodifiable <b>view</b> of the symmetric difference of two
 sets.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;E&gt; <A HREF="../../../../com/google/common/collect/Sets.SetView.html" title="class in com.google.common.collect">Sets.SetView</A>&lt;E&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#union(java.util.Set, java.util.Set)">union</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;? extends E&gt;&nbsp;set1,
      <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;? extends E&gt;&nbsp;set2)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an unmodifiable <b>view</b> of the union of two sets.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="immutableEnumSet(java.lang.Enum,java.lang.Enum[])"><!-- --></A><A NAME="immutableEnumSet(E, E...)"><!-- --></A><H3>
immutableEnumSet</H3>
<PRE>
<FONT SIZE="-1"><A HREF="../../../../com/google/common/annotations/GwtCompatible.html" title="annotation in com.google.common.annotations">@GwtCompatible</A>(<A HREF="../../../../com/google/common/annotations/GwtCompatible.html#serializable()">serializable</A>=true)
</FONT>public static &lt;E extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</A>&lt;E&gt;&gt; <A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A>&lt;E&gt; <B>immutableEnumSet</B>(E&nbsp;anElement,
                                                                                             E...&nbsp;otherElements)</PRE>
<DL>
<DD>Returns an immutable set instance containing the given enum elements.
 Internally, the returned set will be backed by an <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/EnumSet.html?is-external=true" title="class or interface in java.util"><CODE>EnumSet</CODE></A>.

 <p>The iteration order of the returned set follows the enum's iteration
 order, not the order in which the elements are provided to the method.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>anElement</CODE> - one of the elements the set should contain<DD><CODE>otherElements</CODE> - the rest of the elements the set should contain
<DT><B>Returns:</B><DD>an immutable set containing those elements, minus duplicates</DL>
</DD>
</DL>
<HR>

<A NAME="immutableEnumSet(java.lang.Iterable)"><!-- --></A><H3>
immutableEnumSet</H3>
<PRE>
<FONT SIZE="-1"><A HREF="../../../../com/google/common/annotations/GwtCompatible.html" title="annotation in com.google.common.annotations">@GwtCompatible</A>(<A HREF="../../../../com/google/common/annotations/GwtCompatible.html#serializable()">serializable</A>=true)
</FONT>public static &lt;E extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</A>&lt;E&gt;&gt; <A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A>&lt;E&gt; <B>immutableEnumSet</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A>&lt;E&gt;&nbsp;elements)</PRE>
<DL>
<DD>Returns an immutable set instance containing the given enum elements.
 Internally, the returned set will be backed by an <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/EnumSet.html?is-external=true" title="class or interface in java.util"><CODE>EnumSet</CODE></A>.

 <p>The iteration order of the returned set follows the enum's iteration
 order, not the order in which the elements appear in the given collection.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>elements</CODE> - the elements, all of the same <code>enum</code> type, that the
     set should contain
<DT><B>Returns:</B><DD>an immutable set containing those elements, minus duplicates</DL>
</DD>
</DL>
<HR>

<A NAME="newEnumSet(java.lang.Iterable, java.lang.Class)"><!-- --></A><H3>
newEnumSet</H3>
<PRE>
public static &lt;E extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</A>&lt;E&gt;&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/EnumSet.html?is-external=true" title="class or interface in java.util">EnumSet</A>&lt;E&gt; <B>newEnumSet</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A>&lt;E&gt;&nbsp;iterable,
                                                        <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;E&gt;&nbsp;elementType)</PRE>
<DL>
<DD>Returns a new <code>EnumSet</code> instance containing the given elements.
 Unlike <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/EnumSet.html?is-external=true#copyOf(java.util.Collection)" title="class or interface in java.util"><CODE>EnumSet.copyOf(Collection)</CODE></A>, this method does not produce an
 exception on an empty collection, and it may be called on any iterable, not
 just a <code>Collection</code>.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="newHashSet()"><!-- --></A><H3>
newHashSet</H3>
<PRE>
public static &lt;E&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/HashSet.html?is-external=true" title="class or interface in java.util">HashSet</A>&lt;E&gt; <B>newHashSet</B>()</PRE>
<DL>
<DD>Creates a <i>mutable</i>, empty <code>HashSet</code> instance.

 <p><b>Note:</b> if mutability is not required, use <A HREF="../../../../com/google/common/collect/ImmutableSet.html#of()"><CODE>ImmutableSet.of()</CODE></A> instead.

 <p><b>Note:</b> if <code>E</code> is an <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang"><CODE>Enum</CODE></A> type, use <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/EnumSet.html?is-external=true#noneOf(java.lang.Class)" title="class or interface in java.util"><CODE>EnumSet.noneOf(java.lang.Class<E>)</CODE></A> instead.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>a new, empty <code>HashSet</code></DL>
</DD>
</DL>
<HR>

<A NAME="newHashSet(java.lang.Object[])"><!-- --></A><A NAME="newHashSet(E...)"><!-- --></A><H3>
newHashSet</H3>
<PRE>
public static &lt;E&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/HashSet.html?is-external=true" title="class or interface in java.util">HashSet</A>&lt;E&gt; <B>newHashSet</B>(E...&nbsp;elements)</PRE>
<DL>
<DD>Creates a <i>mutable</i> <code>HashSet</code> instance containing the given
 elements in unspecified order.

 <p><b>Note:</b> if mutability is not required and the elements are
 non-null, use an overload of <A HREF="../../../../com/google/common/collect/ImmutableSet.html#of()"><CODE>ImmutableSet.of()</CODE></A> (for varargs) or
 <A HREF="../../../../com/google/common/collect/ImmutableSet.html#copyOf(E[])"><CODE>ImmutableSet.copyOf(Object[])</CODE></A> (for an array) instead.

 <p><b>Note:</b> if <code>E</code> is an <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang"><CODE>Enum</CODE></A> type, use <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/EnumSet.html?is-external=true#of(E, E...)" title="class or interface in java.util"><CODE>EnumSet.of(Enum, Enum[])</CODE></A> instead.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>elements</CODE> - the elements that the set should contain
<DT><B>Returns:</B><DD>a new <code>HashSet</code> containing those elements (minus duplicates)</DL>
</DD>
</DL>
<HR>

<A NAME="newHashSetWithExpectedSize(int)"><!-- --></A><H3>
newHashSetWithExpectedSize</H3>
<PRE>
public static &lt;E&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/HashSet.html?is-external=true" title="class or interface in java.util">HashSet</A>&lt;E&gt; <B>newHashSetWithExpectedSize</B>(int&nbsp;expectedSize)</PRE>
<DL>
<DD>Creates an empty <code>HashSet</code> instance with enough capacity to hold the
 specified number of elements without rehashing.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>expectedSize</CODE> - the expected size
<DT><B>Returns:</B><DD>a new, empty <code>HashSet</code> with enough capacity to hold <code>expectedSize</code> elements without rehashing
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if <code>expectedSize</code> is negative</DL>
</DD>
</DL>
<HR>

<A NAME="newHashSet(java.lang.Iterable)"><!-- --></A><H3>
newHashSet</H3>
<PRE>
public static &lt;E&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/HashSet.html?is-external=true" title="class or interface in java.util">HashSet</A>&lt;E&gt; <B>newHashSet</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A>&lt;? extends E&gt;&nbsp;elements)</PRE>
<DL>
<DD>Creates a <i>mutable</i> <code>HashSet</code> instance containing the given
 elements in unspecified order.

 <p><b>Note:</b> if mutability is not required and the elements are
 non-null, use <A HREF="../../../../com/google/common/collect/ImmutableSet.html#copyOf(java.lang.Iterable)"><CODE>ImmutableSet.copyOf(Iterable)</CODE></A> instead.

 <p><b>Note:</b> if <code>E</code> is an <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang"><CODE>Enum</CODE></A> type, use
 <A HREF="../../../../com/google/common/collect/Sets.html#newEnumSet(java.lang.Iterable, java.lang.Class)"><CODE>newEnumSet(Iterable, Class)</CODE></A> instead.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>elements</CODE> - the elements that the set should contain
<DT><B>Returns:</B><DD>a new <code>HashSet</code> containing those elements (minus duplicates)</DL>
</DD>
</DL>
<HR>

<A NAME="newHashSet(java.util.Iterator)"><!-- --></A><H3>
newHashSet</H3>
<PRE>
public static &lt;E&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/HashSet.html?is-external=true" title="class or interface in java.util">HashSet</A>&lt;E&gt; <B>newHashSet</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A>&lt;? extends E&gt;&nbsp;elements)</PRE>
<DL>
<DD>Creates a <i>mutable</i> <code>HashSet</code> instance containing the given
 elements in unspecified order.

 <p><b>Note:</b> if mutability is not required and the elements are
 non-null, use <A HREF="../../../../com/google/common/collect/ImmutableSet.html#copyOf(java.lang.Iterable)"><CODE>ImmutableSet.copyOf(Iterable)</CODE></A> instead.

 <p><b>Note:</b> if <code>E</code> is an <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang"><CODE>Enum</CODE></A> type, you should create an
 <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/EnumSet.html?is-external=true" title="class or interface in java.util"><CODE>EnumSet</CODE></A> instead.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>elements</CODE> - the elements that the set should contain
<DT><B>Returns:</B><DD>a new <code>HashSet</code> containing those elements (minus duplicates)</DL>
</DD>
</DL>
<HR>

<A NAME="newLinkedHashSet()"><!-- --></A><H3>
newLinkedHashSet</H3>
<PRE>
public static &lt;E&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/LinkedHashSet.html?is-external=true" title="class or interface in java.util">LinkedHashSet</A>&lt;E&gt; <B>newLinkedHashSet</B>()</PRE>
<DL>
<DD>Creates a <i>mutable</i>, empty <code>LinkedHashSet</code> instance.

 <p><b>Note:</b> if mutability is not required, use <A HREF="../../../../com/google/common/collect/ImmutableSet.html#of()"><CODE>ImmutableSet.of()</CODE></A> instead.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>a new, empty <code>LinkedHashSet</code></DL>
</DD>
</DL>
<HR>

<A NAME="newLinkedHashSet(java.lang.Iterable)"><!-- --></A><H3>
newLinkedHashSet</H3>
<PRE>
public static &lt;E&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/LinkedHashSet.html?is-external=true" title="class or interface in java.util">LinkedHashSet</A>&lt;E&gt; <B>newLinkedHashSet</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A>&lt;? extends E&gt;&nbsp;elements)</PRE>
<DL>
<DD>Creates a <i>mutable</i> <code>LinkedHashSet</code> instance containing the
 given elements in order.

 <p><b>Note:</b> if mutability is not required and the elements are
 non-null, use <A HREF="../../../../com/google/common/collect/ImmutableSet.html#copyOf(java.lang.Iterable)"><CODE>ImmutableSet.copyOf(Iterable)</CODE></A> instead.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>elements</CODE> - the elements that the set should contain, in order
<DT><B>Returns:</B><DD>a new <code>LinkedHashSet</code> containing those elements (minus
     duplicates)</DL>
</DD>
</DL>
<HR>

<A NAME="newTreeSet()"><!-- --></A><H3>
newTreeSet</H3>
<PRE>
public static &lt;E extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</A>&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/TreeSet.html?is-external=true" title="class or interface in java.util">TreeSet</A>&lt;E&gt; <B>newTreeSet</B>()</PRE>
<DL>
<DD>Creates a <i>mutable</i>, empty <code>TreeSet</code> instance sorted by the
 natural sort ordering of its elements.

 <p><b>Note:</b> if mutability is not required, use <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#of()"><CODE>ImmutableSortedSet.of()</CODE></A> instead.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>a new, empty <code>TreeSet</code></DL>
</DD>
</DL>
<HR>

<A NAME="newTreeSet(java.lang.Iterable)"><!-- --></A><H3>
newTreeSet</H3>
<PRE>
public static &lt;E extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</A>&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/TreeSet.html?is-external=true" title="class or interface in java.util">TreeSet</A>&lt;E&gt; <B>newTreeSet</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A>&lt;? extends E&gt;&nbsp;elements)</PRE>
<DL>
<DD>Creates a <i>mutable</i> <code>TreeSet</code> instance containing the given
 elements sorted by their natural ordering.

 <p><b>Note:</b> if mutability is not required, use <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#copyOf(java.lang.Iterable)"><CODE>ImmutableSortedSet.copyOf(Iterable)</CODE></A> instead.

 <p><b>Note:</b> If <code>elements</code> is a <code>SortedSet</code> with an explicit
 comparator, this method has different behavior than
 <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/TreeSet.html?is-external=true#TreeSet(java.util.SortedSet)" title="class or interface in java.util"><CODE>TreeSet.TreeSet(SortedSet)</CODE></A>, which returns a <code>TreeSet</code> with
 that comparator.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>elements</CODE> - the elements that the set should contain
<DT><B>Returns:</B><DD>a new <code>TreeSet</code> containing those elements (minus duplicates)</DL>
</DD>
</DL>
<HR>

<A NAME="newTreeSet(java.util.Comparator)"><!-- --></A><H3>
newTreeSet</H3>
<PRE>
public static &lt;E&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/TreeSet.html?is-external=true" title="class or interface in java.util">TreeSet</A>&lt;E&gt; <B>newTreeSet</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A>&lt;? super E&gt;&nbsp;comparator)</PRE>
<DL>
<DD>Creates a <i>mutable</i>, empty <code>TreeSet</code> instance with the given
 comparator.

 <p><b>Note:</b> if mutability is not required, use <code>ImmutableSortedSet.orderedBy(comparator).build()</code> instead.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>comparator</CODE> - the comparator to use to sort the set
<DT><B>Returns:</B><DD>a new, empty <code>TreeSet</code>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - if <code>comparator</code> is null</DL>
</DD>
</DL>
<HR>

<A NAME="newIdentityHashSet()"><!-- --></A><H3>
newIdentityHashSet</H3>
<PRE>
<FONT SIZE="-1"><A HREF="../../../../com/google/common/annotations/Beta.html" title="annotation in com.google.common.annotations">@Beta</A>
</FONT>public static &lt;E&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;E&gt; <B>newIdentityHashSet</B>()</PRE>
<DL>
<DD>Creates an empty <code>Set</code> that uses identity to determine equality. It
 compares object references, instead of calling <code>equals</code>, to
 determine whether a provided object matches an element in the set. For
 example, <code>contains</code> returns <code>false</code> when passed an object that
 equals a set member, but isn't the same instance. This behavior is similar
 to the way <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/IdentityHashMap.html?is-external=true" title="class or interface in java.util"><CODE>IdentityHashMap</CODE></A> handles key lookups.
<P>
<DD><DL>
<DT><B>Since:</B></DT>
  <DD>8</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="complementOf(java.util.Collection)"><!-- --></A><H3>
complementOf</H3>
<PRE>
public static &lt;E extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</A>&lt;E&gt;&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/EnumSet.html?is-external=true" title="class or interface in java.util">EnumSet</A>&lt;E&gt; <B>complementOf</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;E&gt;&nbsp;collection)</PRE>
<DL>
<DD>Creates an <code>EnumSet</code> consisting of all enum values that are not in
 the specified collection. If the collection is an <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/EnumSet.html?is-external=true" title="class or interface in java.util"><CODE>EnumSet</CODE></A>, this
 method has the same behavior as <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/EnumSet.html?is-external=true#complementOf(java.util.EnumSet)" title="class or interface in java.util"><CODE>EnumSet.complementOf(java.util.EnumSet<E>)</CODE></A>. Otherwise,
 the specified collection must contain at least one element, in order to
 determine the element type. If the collection could be empty, use
 <A HREF="../../../../com/google/common/collect/Sets.html#complementOf(java.util.Collection, java.lang.Class)"><CODE>complementOf(Collection, Class)</CODE></A> instead of this method.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>collection</CODE> - the collection whose complement should be stored in the
     enum set
<DT><B>Returns:</B><DD>a new, modifiable <code>EnumSet</code> containing all values of the enum
     that aren't present in the given collection
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if <code>collection</code> is not an
     <code>EnumSet</code> instance and contains no elements</DL>
</DD>
</DL>
<HR>

<A NAME="complementOf(java.util.Collection, java.lang.Class)"><!-- --></A><H3>
complementOf</H3>
<PRE>
public static &lt;E extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</A>&lt;E&gt;&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/EnumSet.html?is-external=true" title="class or interface in java.util">EnumSet</A>&lt;E&gt; <B>complementOf</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;E&gt;&nbsp;collection,
                                                          <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;E&gt;&nbsp;type)</PRE>
<DL>
<DD>Creates an <code>EnumSet</code> consisting of all enum values that are not in
 the specified collection. This is equivalent to
 <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/EnumSet.html?is-external=true#complementOf(java.util.EnumSet)" title="class or interface in java.util"><CODE>EnumSet.complementOf(java.util.EnumSet<E>)</CODE></A>, but can act on any input collection, as long
 as the elements are of enum type.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>collection</CODE> - the collection whose complement should be stored in the
     <code>EnumSet</code><DD><CODE>type</CODE> - the type of the elements in the set
<DT><B>Returns:</B><DD>a new, modifiable <code>EnumSet</code> initially containing all the
     values of the enum not present in the given collection</DL>
</DD>
</DL>
<HR>

<A NAME="newSetFromMap(java.util.Map)"><!-- --></A><H3>
newSetFromMap</H3>
<PRE>
public static &lt;E&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;E&gt; <B>newSetFromMap</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;E,<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</A>&gt;&nbsp;map)</PRE>
<DL>
<DD>Returns a set backed by the specified map. The resulting set displays
 the same ordering, concurrency, and performance characteristics as the
 backing map. In essence, this factory method provides a <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util"><CODE>Set</CODE></A>
 implementation corresponding to any <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><CODE>Map</CODE></A> implementation. There is no
 need to use this method on a <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><CODE>Map</CODE></A> implementation that already has a
 corresponding <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util"><CODE>Set</CODE></A> implementation (such as <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util"><CODE>HashMap</CODE></A> or
 <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/TreeMap.html?is-external=true" title="class or interface in java.util"><CODE>TreeMap</CODE></A>).

 <p>Each method invocation on the set returned by this method results in
 exactly one method invocation on the backing map or its <tt>keySet</tt>
 view, with one exception. The <tt>addAll</tt> method is implemented as a
 sequence of <tt>put</tt> invocations on the backing map.

 <p>The specified map must be empty at the time this method is invoked,
 and should not be accessed directly after this method returns. These
 conditions are ensured if the map is created empty, passed directly
 to this method, and no reference to the map is retained, as illustrated
 in the following code fragment: <pre>  <code>Set&lt;Object&gt; identityHashSet = Sets.newSetFromMap(
       new IdentityHashMap&lt;Object, Boolean&gt;());</code></pre>

 This method has the same behavior as the JDK 6 method
 <code>Collections.newSetFromMap()</code>. The returned set is serializable if
 the backing map is.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>map</CODE> - the backing map
<DT><B>Returns:</B><DD>the set backed by the map
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if <tt>map</tt> is not empty</DL>
</DD>
</DL>
<HR>

<A NAME="union(java.util.Set, java.util.Set)"><!-- --></A><H3>
union</H3>
<PRE>
public static &lt;E&gt; <A HREF="../../../../com/google/common/collect/Sets.SetView.html" title="class in com.google.common.collect">Sets.SetView</A>&lt;E&gt; <B>union</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;? extends E&gt;&nbsp;set1,
                                        <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;? extends E&gt;&nbsp;set2)</PRE>
<DL>
<DD>Returns an unmodifiable <b>view</b> of the union of two sets. The returned
 set contains all elements that are contained in either backing set.
 Iterating over the returned set iterates first over all the elements of
 <code>set1</code>, then over each element of <code>set2</code>, in order, that is not
 contained in <code>set1</code>.

 <p>Results are undefined if <code>set1</code> and <code>set2</code> are sets based on
 different equivalence relations (as <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/HashSet.html?is-external=true" title="class or interface in java.util"><CODE>HashSet</CODE></A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/TreeSet.html?is-external=true" title="class or interface in java.util"><CODE>TreeSet</CODE></A>, and
 the <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#keySet()" title="class or interface in java.util"><CODE>Map.keySet()</CODE></A> of an <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/IdentityHashMap.html?is-external=true" title="class or interface in java.util"><CODE>IdentityHashMap</CODE></A> all are).

 <p><b>Note:</b> The returned view performs better when <code>set1</code> is the
 smaller of the two sets. If you have reason to believe one of your sets
 will generally be smaller than the other, pass it first.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="intersection(java.util.Set, java.util.Set)"><!-- --></A><H3>
intersection</H3>
<PRE>
public static &lt;E&gt; <A HREF="../../../../com/google/common/collect/Sets.SetView.html" title="class in com.google.common.collect">Sets.SetView</A>&lt;E&gt; <B>intersection</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;E&gt;&nbsp;set1,
                                               <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;?&gt;&nbsp;set2)</PRE>
<DL>
<DD>Returns an unmodifiable <b>view</b> of the intersection of two sets. The
 returned set contains all elements that are contained by both backing sets.
 The iteration order of the returned set matches that of <code>set1</code>.

 <p>Results are undefined if <code>set1</code> and <code>set2</code> are sets based
 on different equivalence relations (as <code>HashSet</code>, <code>TreeSet</code>,
 and the keySet of an <code>IdentityHashMap</code> all are).

 <p><b>Note:</b> The returned view performs slightly better when <code>set1</code> is the smaller of the two sets. If you have reason to believe one of
 your sets will generally be smaller than the other, pass it first.
 Unfortunately, since this method sets the generic type of the returned set
 based on the type of the first set passed, this could in rare cases force
 you to make a cast, for example: <pre>   <code>Set&lt;Object&gt; aFewBadObjects = ...
   Set&lt;String&gt; manyBadStrings = ...

   // impossible for a non-String to be in the intersection
   SuppressWarnings("unchecked")
   Set&lt;String&gt; badStrings = (Set) Sets.intersection(
       aFewBadObjects, manyBadStrings);</code></pre>

 This is unfortunate, but should come up only very rarely.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="difference(java.util.Set, java.util.Set)"><!-- --></A><H3>
difference</H3>
<PRE>
public static &lt;E&gt; <A HREF="../../../../com/google/common/collect/Sets.SetView.html" title="class in com.google.common.collect">Sets.SetView</A>&lt;E&gt; <B>difference</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;E&gt;&nbsp;set1,
                                             <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;?&gt;&nbsp;set2)</PRE>
<DL>
<DD>Returns an unmodifiable <b>view</b> of the difference of two sets. The
 returned set contains all elements that are contained by <code>set1</code> and
 not contained by <code>set2</code>. <code>set2</code> may also contain elements not
 present in <code>set1</code>; these are simply ignored. The iteration order of
 the returned set matches that of <code>set1</code>.

 <p>Results are undefined if <code>set1</code> and <code>set2</code> are sets based
 on different equivalence relations (as <code>HashSet</code>, <code>TreeSet</code>,
 and the keySet of an <code>IdentityHashMap</code> all are).
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="symmetricDifference(java.util.Set, java.util.Set)"><!-- --></A><H3>
symmetricDifference</H3>
<PRE>
<FONT SIZE="-1"><A HREF="../../../../com/google/common/annotations/Beta.html" title="annotation in com.google.common.annotations">@Beta</A>
</FONT>public static &lt;E&gt; <A HREF="../../../../com/google/common/collect/Sets.SetView.html" title="class in com.google.common.collect">Sets.SetView</A>&lt;E&gt; <B>symmetricDifference</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;? extends E&gt;&nbsp;set1,
                                                           <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;? extends E&gt;&nbsp;set2)</PRE>
<DL>
<DD>Returns an unmodifiable <b>view</b> of the symmetric difference of two
 sets. The returned set contains all elements that are contained in either
 <code>set1</code> or <code>set2</code> but not in both. The iteration order of the
 returned set is undefined.

 <p>Results are undefined if <code>set1</code> and <code>set2</code> are sets based
 on different equivalence relations (as <code>HashSet</code>, <code>TreeSet</code>,
 and the keySet of an <code>IdentityHashMap</code> all are).
<P>
<DD><DL>
<DT><B>Since:</B></DT>
  <DD>3</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="filter(java.util.Set, com.google.common.base.Predicate)"><!-- --></A><H3>
filter</H3>
<PRE>
public static &lt;E&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;E&gt; <B>filter</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;E&gt;&nbsp;unfiltered,
                                <A HREF="../../../../com/google/common/base/Predicate.html" title="interface in com.google.common.base">Predicate</A>&lt;? super E&gt;&nbsp;predicate)</PRE>
<DL>
<DD>Returns the elements of <code>unfiltered</code> that satisfy a predicate. The
 returned set is a live view of <code>unfiltered</code>; changes to one affect
 the other.

 <p>The resulting set's iterator does not support <code>remove()</code>, but all
 other set methods are supported. When given an element that doesn't satisfy
 the predicate, the set's <code>add()</code> and <code>addAll()</code> methods throw
 an <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang"><CODE>IllegalArgumentException</CODE></A>. When methods such as <code>removeAll()</code> and <code>clear()</code> are called on the filtered set, only
 elements that satisfy the filter will be removed from the underlying set.

 <p>The returned set isn't threadsafe or serializable, even if
 <code>unfiltered</code> is.

 <p>Many of the filtered set's methods, such as <code>size()</code>, iterate
 across every element in the underlying set and determine which elements
 satisfy the filter. When a live view is <i>not</i> needed, it may be faster
 to copy <code>Iterables.filter(unfiltered, predicate)</code> and use the copy.

 <p><b>Warning:</b> <code>predicate</code> must be <i>consistent with equals</i>,
 as documented at <A HREF="../../../../com/google/common/base/Predicate.html#apply(T)"><CODE>Predicate.apply(T)</CODE></A>. Do not provide a predicate such
 as <code>Predicates.instanceOf(ArrayList.class)</code>, which is inconsistent
 with equals. (See <A HREF="../../../../com/google/common/collect/Iterables.html#filter(java.lang.Iterable, java.lang.Class)"><CODE>Iterables.filter(Iterable, Class)</CODE></A> for related
 functionality.)
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="cartesianProduct(java.util.List)"><!-- --></A><H3>
cartesianProduct</H3>
<PRE>
public static &lt;B&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;B&gt;&gt; <B>cartesianProduct</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;? extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;? extends B&gt;&gt;&nbsp;sets)</PRE>
<DL>
<DD>Returns every possible list that can be formed by choosing one element
 from each of the given sets in order; the "n-ary
 <a href="http://en.wikipedia.org/wiki/Cartesian_product">Cartesian
 product</a>" of the sets. For example: <pre>   <code>Sets.cartesianProduct(ImmutableList.of(
       ImmutableSet.of(1, 2),
       ImmutableSet.of("A", "B", "C")))</code></pre>

 returns a set containing six lists:

 <ul>
 <li><code>ImmutableList.of(1, "A")</code>
 <li><code>ImmutableList.of(1, "B")</code>
 <li><code>ImmutableList.of(1, "C")</code>
 <li><code>ImmutableList.of(2, "A")</code>
 <li><code>ImmutableList.of(2, "B")</code>
 <li><code>ImmutableList.of(2, "C")</code>
 </ul>

 The order in which these lists are returned is not guaranteed, however the
 position of an element inside a tuple always corresponds to the position of
 the set from which it came in the input list. Note that if any input set is
 empty, the Cartesian product will also be empty. If no sets at all are
 provided (an empty list), the resulting Cartesian product has one element,
 an empty list (counter-intuitive, but mathematically consistent).

 <p><i>Performance notes:</i> while the cartesian product of sets of size
 <code>m, n, p</code> is a set of size <code>m x n x p</code>, its actual memory
 consumption is much smaller. When the cartesian set is constructed, the
 input sets are merely copied. Only as the resulting set is iterated are the
 individual lists created, and these are not retained after iteration.
<P>
<DD><DL>
<DT><B>Type Parameters:</B><DD><CODE>B</CODE> - any common base class shared by all axes (often just <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang"><CODE>Object</CODE></A>)<DT><B>Parameters:</B><DD><CODE>sets</CODE> - the sets to choose elements from, in the order that
     the elements chosen from those sets should appear in the resulting
     lists
<DT><B>Returns:</B><DD>the Cartesian product, as an immutable set containing immutable
     lists
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - if <code>sets</code>, any one of the <code>sets</code>,
     or any element of a provided set is null<DT><B>Since:</B></DT>
  <DD>2</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="cartesianProduct(java.util.Set...)"><!-- --></A><H3>
cartesianProduct</H3>
<PRE>
public static &lt;B&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;B&gt;&gt; <B>cartesianProduct</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;? extends B&gt;...&nbsp;sets)</PRE>
<DL>
<DD>Returns every possible list that can be formed by choosing one element
 from each of the given sets in order; the "n-ary
 <a href="http://en.wikipedia.org/wiki/Cartesian_product">Cartesian
 product</a>" of the sets. For example: <pre>   <code>Sets.cartesianProduct(
       ImmutableSet.of(1, 2),
       ImmutableSet.of("A", "B", "C"))</code></pre>

 returns a set containing six lists:

 <ul>
 <li><code>ImmutableList.of(1, "A")</code>
 <li><code>ImmutableList.of(1, "B")</code>
 <li><code>ImmutableList.of(1, "C")</code>
 <li><code>ImmutableList.of(2, "A")</code>
 <li><code>ImmutableList.of(2, "B")</code>
 <li><code>ImmutableList.of(2, "C")</code>
 </ul>

 The order in which these lists are returned is not guaranteed, however the
 position of an element inside a tuple always corresponds to the position of
 the set from which it came in the input list. Note that if any input set is
 empty, the Cartesian product will also be empty. If no sets at all are
 provided, the resulting Cartesian product has one element, an empty list
 (counter-intuitive, but mathematically consistent).

 <p><i>Performance notes:</i> while the cartesian product of sets of size
 <code>m, n, p</code> is a set of size <code>m x n x p</code>, its actual memory
 consumption is much smaller. When the cartesian set is constructed, the
 input sets are merely copied. Only as the resulting set is iterated are the
 individual lists created, and these are not retained after iteration.
<P>
<DD><DL>
<DT><B>Type Parameters:</B><DD><CODE>B</CODE> - any common base class shared by all axes (often just <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang"><CODE>Object</CODE></A>)<DT><B>Parameters:</B><DD><CODE>sets</CODE> - the sets to choose elements from, in the order that
     the elements chosen from those sets should appear in the resulting
     lists
<DT><B>Returns:</B><DD>the Cartesian product, as an immutable set containing immutable
     lists
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - if <code>sets</code>, any one of the <code>sets</code>,
     or any element of a provided set is null<DT><B>Since:</B></DT>
  <DD>2</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="powerSet(java.util.Set)"><!-- --></A><H3>
powerSet</H3>
<PRE>
<FONT SIZE="-1"><A HREF="../../../../com/google/common/annotations/GwtCompatible.html" title="annotation in com.google.common.annotations">@GwtCompatible</A>(<A HREF="../../../../com/google/common/annotations/GwtCompatible.html#serializable()">serializable</A>=false)
</FONT>public static &lt;E&gt; <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;E&gt;&gt; <B>powerSet</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;E&gt;&nbsp;set)</PRE>
<DL>
<DD>Returns the set of all possible subsets of <code>set</code>. For example,
 <code>powerSet(ImmutableSet.of(1, 2))</code> returns the set <code>{{},
 {1}, {2}, {1, 2}}</code>.

 <p>Elements appear in these subsets in the same iteration order as they
 appeared in the input set. The order in which these subsets appear in the
 outer set is undefined. Note that the power set of the empty set is not the
 empty set, but a one-element set containing the empty set.

 <p>The returned set and its constituent sets use <code>equals</code> to decide
 whether two elements are identical, even if the input set uses a different
 concept of equivalence.

 <p><i>Performance notes:</i> while the power set of a set with size <code>n</code> is of size <code>2^n</code>, its memory usage is only <code>O(n)</code>. When the
 power set is constructed, the input set is merely copied. Only as the
 power set is iterated are the individual subsets created, and these subsets
 themselves occupy only a few bytes of memory regardless of their size.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>set</CODE> - the set of elements to construct a power set from
<DT><B>Returns:</B><DD>the power set, as an immutable set of immutable sets
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if <code>set</code> has more than 30 unique
     elements (causing the power set size to exceed the <code>int</code> range)
<DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - if <code>set</code> or any of its elements is
     null<DT><B>Since:</B></DT>
  <DD>4</DD>
<DT><B>See Also:</B><DD><a href="http://en.wikipedia.org/wiki/Power_set">Power set article at
      Wikipedia</a></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="interface in com.google.common.collect"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../com/google/common/collect/Sets.SetView.html" title="class in com.google.common.collect"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?com/google/common/collect/Sets.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Sets.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

</BODY>
</HTML>
